package com.dries.portal.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dries.portal.admin.entity.UmsAdminRoleRelation;
import com.dries.portal.admin.entity.UmsResource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 后台用户和角色关系表
 * 
 * @author dries
 * @email samphsanie@gmail.com
 * @date 2020-09-22 18:23:26
 */
@Mapper
public interface UmsAdminRoleRelationMapper extends BaseMapper<UmsAdminRoleRelation> {

    /**
     * 获取资源相关用户ID列表
     */
    List<Long> getAdminIdList(@Param("resourceId") Long resourceId);
    /**
     * 获取用户所有可访问资源
     */
    List<UmsResource> getResourceList(@Param("adminId") Long adminId);
}
